/*
 * @Author: Jimmy
 * @LastModifiedBy: Jimmy
 * @Date: 2024-05-29 19:44:56
 * @LastEditTime: 2024-06-06 22:02:14
 * @FilePath: /nest_study/src/modules/system/access/dto/index.dto.ts
 */
import { ApiProperty } from "@nestjs/swagger";
import { IsOptional, IsString, Length } from "class-validator";

export class LoginDto {
    // @ApiProperty({
    //     required: true
    // })
    // @IsOptional()
    // @IsString()
    // code: string;

    @ApiProperty({
        required: true,
        description:"用户名"
    })
    @IsString()
    @Length(2, 20)
    username: string;
    
    @ApiProperty({
        required: true,
        description:"密码"
    })
    @IsString()
    @Length(5, 20)
    password: string;
}

export class ClientInfoDto {
    ip: string;
    userAgent: string;
    browser: string;
    os: string;
    location: string
}
